package com.htgd.gardenexpo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.htgd.gardenexpo.dao.GeConCalendarDao;
import com.htgd.gardenexpo.entity.GeConCalendar;
import com.htgd.gardenexpo.entity.PageQuery;
import com.htgd.gardenexpo.service.GeConCalendarService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 新闻表 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-02-06
 */
@Service
public class GeConCalendarServiceImpl extends ServiceImpl<GeConCalendarDao, GeConCalendar> implements GeConCalendarService {

    @Resource
    private GeConCalendarDao geConCalendarDao;

    @Override
    public void insert(GeConCalendar geConCalendar) {
        geConCalendarDao.insert(geConCalendar);
    }

    @Override
    public void updateEntity(GeConCalendar geConCalendar) {
        geConCalendarDao.updateById(geConCalendar);
    }

    @Override
    public void deleteById(int newId) {
        geConCalendarDao.deleteById(newId);
    }

    @Override
    public List<GeConCalendar> getAllNewsByValue(PageQuery pageQuery) {
        return geConCalendarDao.getAllNewsByValue(pageQuery);
    }

    @Override
    public List<GeConCalendar> getAllNewsByValueNoContent(PageQuery pageQuery) {
        return geConCalendarDao.getAllNewsByValueNoContent(pageQuery);
    }

    @Override
    public GeConCalendar queryById(Integer newId) {
        return geConCalendarDao.queryById(newId);
    }

}
